import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooUctooSessionController } from '../../../controllers';
const uctoouctooSessionRouter = new Router();
const uctooSessionController = new uctooUctooSessionController();

uctoouctooSessionRouter.post('/add', requireUser, uctooSessionController.add);
uctoouctooSessionRouter.post('/edit', requireUser, rowLevelPermission('uctoo/uctoo_session'), uctooSessionController.edit);
uctoouctooSessionRouter.post('/del', requireUser, rowLevelPermission('uctoo/uctoo_session'), uctooSessionController.delete);

//For getting uctooSession with permission control
uctoouctooSessionRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/uctoo_session'), uctooSessionController.getSingle);
uctoouctooSessionRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/uctoo_session'), uctooSessionController.getMany);
uctoouctooSessionRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/uctoo_session'), uctooSessionController.getMany);

//#endregion AutoCreateCode
export default uctoouctooSessionRouter;
